﻿using System.Collections;
using System.Collections.Generic;
using CourseManager.Model.Data;

namespace CourseManager.Model
{
	public class Teacher : AbstractRole
	{
		public  readonly Hashtable scTable = new Hashtable();

		public Teacher(string id)
		{
			Tab_Teacher teacher = TeacherDAO.FindById(id);
			Id = teacher.teacherId;
			Sex = teacher.sex;
			Name = teacher.name;
			Dept = teacher.dept;
			foreach(Tab_Course course in TeacherDAO.GetCourseList(Id))
			{
				CourseList.Add(Course.get(course.courseId, course.tId));
				scTable.Add(course.courseId + " " + course.tId, SCDAO.GetSCList(course));
			}
			UpdateCourseTag();
		}
	}


} 